package operators;

public class Exercise6 {

  public static void main(String[] args) {
    Dog dog1 = new Dog("spot", "ruff!");

    Dog dog2 = new Dog("scuffy", "wurf!");

    System.out.println(dog1.getName() + " says " + dog1.getSays());
    System.out.println(dog2.getName() + " says " + dog2.getSays());
    
    Dog dog3 = dog1;
    
    compare(dog1, dog2);
    compare(dog1, dog3);
    compare(dog2, dog3);
    
    
  }
  
  
  static void compare(Dog d1, Dog d2) {
    
    System.out.println(d1.getName() + " == " + d2.getName() + " is " + (d1 == d2));
    System.out.println(d1.getName() + " equals " + d2.getSays() + " is " + d1.equals(d2));
  }
}
